﻿using System.Collections.Generic;
using System.Threading.Tasks;
using GrapeCity.Forguncy.Commands;
using Newtonsoft.Json.Linq;
using TencentCloudOcrPlugin.Api;
using TencentCloudOcrPlugin.Resources;

namespace TencentCloudOcrPlugin
{
    public abstract class TencentCloudApiAction
    {
        public abstract Task<Dictionary<string, object>> RunAsync(TencentCloudApiClientConfig clientConfig,
            IServerCommandExecuteContext dataContext, TencentCloudApiPropertyBase operationParams);

        public virtual bool IsListParam(object operationParams)
        {
            return false;
        }

        public virtual List<string> GetParamList(TencentCloudApiPropertyBase operationParams)
        {
            return new List<string>();
        }

        public virtual Dictionary<string, string> GetParamDescription(TencentCloudApiPropertyBase properties)
        {
            var dictionary = new Dictionary<string, string>();
            if (properties.advancedSettings.TencentRawResp)
            {
                dictionary["原始数据"] = "腾讯云接口原始返回数据";
            }
            return dictionary;
        }
    }
}